package org.csu.mypetstore.persistence;

import org.apache.ibatis.annotations.Param;
import org.csu.mypetstore.domain.Inventory;
import org.csu.mypetstore.domain.Item;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ItemMapper {
    List<Item> getItemListByProductId(String productId);

    Item getItemByItemId(String itemId);

    Inventory getQuantityByItemId(String itemId);

    void updateQuantity(@Param("itemId")String itemId, @Param("quantity")int quantity);

    void deleteInventory(@Param("itemId")String itemId);

    void deleteItem(@Param("itemId")String itemId);

    void updateItem(Item item);

    List<Item> getAll();

    void deleteItemByProductId(String productId);

    void addItem(Item item);

    void addInventory(@Param("itemId") String itemId, @Param("quantity")int quantity);

    void updateQuantityRelative(@Param("itemId")String itemId, @Param("quantity")int quantity);
}
